package com.web.activiti.service;

import com.web.activiti.pojo.Employee;
import com.web.activiti.pojo.Leavebill;
import org.activiti.engine.TaskService;
import org.activiti.engine.repository.Deployment;
import org.activiti.engine.repository.ProcessDefinition;
import org.activiti.engine.task.Comment;
import org.activiti.engine.task.Task;

import java.io.InputStream;
import java.util.List;

public interface WorkFlowService {
        //查询流程定义图
    public void delployProcess(String processName, InputStream resourceFile);
        //查询所有流程部署信息
    List<Deployment> findAllDeployments ();

        //查询所有流程定义信息
    List<ProcessDefinition> findAllProcessDefinitions ();

    /**
     * 启动流程实例
     * @param leavebill
     * @param employee
     */
    public void saveStartProcess(Leavebill leavebill,Employee employee);

    /**
     * 查询我的待办事务
     * @param assignee
     * @return
     */
    public List<Task>  findTaskListByUserId(String assignee);

    Leavebill findBillByTask (String taskId);

    List<Comment> findCommentList (String taskId);

    void saveSubmitTask (long id , String taskId , String comment , String name);
}
